3.84 \(\int (a+b x) (A+B x) \, dx\)

Optimal. Leaf size=28 \[ \frac {1}{2} x^2 (a B+A b)+a A x+\frac {1}{3} b B x^3 \]

[Out]

a*A*x+1/2*(A*b+B*a)*x^2+1/3*b*B*x^3

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {43} \[ \frac {1}{2} x^2 (a B+A b)+a A x+\frac {1}{3} b B x^3 \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x)*(A + B*x),x]

[Out]

a*A*x + ((A*b + a*B)*x^2)/2 + (b*B*x^3)/3

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int (a+b x) (A+B x) \, dx &=\int \left (a A+(A b+a B) x+b B x^2\right ) \, dx\\ &=a A x+\frac {1}{2} (A b+a B) x^2+\frac {1}{3} b B x^3\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 28, normalized size = 1.00 \[ \frac {1}{2} x^2 (a B+A b)+a A x+\frac {1}{3} b B x^3 \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x)*(A + B*x),x]

[Out]

a*A*x + ((A*b + a*B)*x^2)/2 + (b*B*x^3)/3

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 26, normalized size = 0.93 \[ \frac {1}{3} x^{3} b B + \frac {1}{2} x^{2} a B + \frac {1}{2} x^{2} b A + x a A \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A),x, algorithm="fricas")

[Out]

1/3*x^3*b*B + 1/2*x^2*a*B + 1/2*x^2*b*A + x*a*A

________________________________________________________________________________________

giac [A]  time = 1.25, size = 26, normalized size = 0.93 \[ \frac {1}{3} \, B b x^{3} + \frac {1}{2} \, B a x^{2} + \frac {1}{2} \, A b x^{2} + A a x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A),x, algorithm="giac")

[Out]

1/3*B*b*x^3 + 1/2*B*a*x^2 + 1/2*A*b*x^2 + A*a*x

________________________________________________________________________________________

maple [A]  time = 0.00, size = 25, normalized size = 0.89 \[ \frac {B b \,x^{3}}{3}+A a x +\frac {\left (A b +B a \right ) x^{2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)*(B*x+A),x)

[Out]

a*A*x+1/2*(A*b+B*a)*x^2+1/3*b*B*x^3

________________________________________________________________________________________

maxima [A]  time = 1.11, size = 24, normalized size = 0.86 \[ \frac {1}{3} \, B b x^{3} + A a x + \frac {1}{2} \, {\left (B a + A b\right )} x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A),x, algorithm="maxima")

[Out]

1/3*B*b*x^3 + A*a*x + 1/2*(B*a + A*b)*x^2

________________________________________________________________________________________

mupad [B]  time = 0.04, size = 25, normalized size = 0.89 \[ \frac {B\,b\,x^3}{3}+\left (\frac {A\,b}{2}+\frac {B\,a}{2}\right )\,x^2+A\,a\,x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)*(a + b*x),x)

[Out]

x^2*((A*b)/2 + (B*a)/2) + A*a*x + (B*b*x^3)/3

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 26, normalized size = 0.93 \[ A a x + \frac {B b x^{3}}{3} + x^{2} \left (\frac {A b}{2} + \frac {B a}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)*(B*x+A),x)

[Out]

A*a*x + B*b*x**3/3 + x**2*(A*b/2 + B*a/2)

________________________________________________________________________________________